package org.javamianshi.core;

/**
 * Created by Fan on 2017/3/2.
 */
public class Ball implements Rollable{

    private String name;
    public String getName(){
        return name;
    }
    public Ball(String name){
        this.name = name;
    }

    @Override
    public void play() {
        //ball = new Ball("Football");
        System.out.println(ball.getName());
    }
}
interface Playable{
    void play();
}
interface Bounceable{
    void play();
}
interface Rollable extends Playable,Bounceable{
    //接口的成员变量默认是final，
    Ball ball = new Ball("PingPang");
}
